package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/10/19 20:59
 **/
public class Day47_3_Num258_AddDigits {
    public static int AddDigits(int num) {
        while(num < 10){
            int sum = 0;
            while(num > 0){

                sum += num % 10;
                num /= 10;
                System.out.println(num);
            }
            num = sum;
        }
        return num;
    }
}